* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
  background: #f5f5f5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
}

/* Header */
.header {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 24px 32px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  width: 48px;
  height: 48px;
}

.logo h1 {
  font-size: 24px;
  font-weight: 600;
  color: #1a73e8;
  margin-bottom: 4px;
}

.logo p {
  color: #666;
  font-size: 14px;
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* Navigation */
.nav-tabs {
  display: flex;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 32px;
}

.nav-tab {
  background: none;
  border: none;
  padding: 16px 24px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: #333;
  background: rgba(26, 115, 232, 0.08);
}

.nav-tab.active {
  color: #1a73e8;
  border-bottom-color: #1a73e8;
  background: #fff;
}

/* Content */
.content {
  padding: 32px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Sections */
.section {
  margin-bottom: 48px;
}

.section:last-child {
  margin-bottom: 0;
}

.section h2 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  margin-bottom: 0;
}

/* Settings */
.setting-group {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.setting-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.setting-description {
  color: #666;
  font-size: 13px;
  line-height: 1.4;
  margin-left: 28px;
}

/* Custom Checkbox */
.setting-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 16px;
  height: 16px;
  border: 2px solid #dadce0;
  border-radius: 3px;
  position: relative;
  transition: all 0.2s;
}

.setting-label input[type="checkbox"]:checked + .checkmark {
  background: #1a73e8;
  border-color: #1a73e8;
}

.setting-label input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 3px;
  top: 0px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Form Elements */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.1);
}

.form-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.form-row input,
.form-row select {
  flex: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid #dadce0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn:hover {
  background: #f8f9fa;
  border-color: #c0c4c7;
}

.btn.primary {
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

.btn.primary:hover {
  background: #1557b0;
  border-color: #1557b0;
}

.btn.secondary {
  background: #fff;
  color: #333;
}

.btn.danger {
  background: #d93025;
  color: #fff;
  border-color: #d93025;
}

.btn.danger:hover {
  background: #b52d20;
  border-color: #b52d20;
}

.button-group {
  display: flex;
  gap: 12px;
}

/* Sessions Grid */
.sessions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.session-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.2s;
}

.session-card:hover {
  border-color: #1a73e8;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.session-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.session-card-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.session-card-color {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.session-card-name {
  font-weight: 600;
  color: #333;
}

.session-card-actions {
  display: flex;
  gap: 8px;
}

.session-card-action {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.2s;
}

.session-card-action:hover {
  background: #f1f3f4;
  color: #333;
}

.session-card-action.danger:hover {
  background: #fce8e6;
  color: #d93025;
}

.session-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.session-card-stat {
  text-align: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
}

.session-card-stat-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.session-card-stat-label {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

.session-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.feature-tag {
  padding: 2px 8px;
  background: #e8f0fe;
  color: #1a73e8;
  font-size: 11px;
  border-radius: 12px;
}

.feature-tag.proxy {
  background: #e6f4ea;
  color: #137333;
}

.feature-tag.fingerprint {
  background: #fef7e0;
  color: #f57c00;
}

/* Proxy List */
.proxy-list {
  margin-top: 24px;
}

.proxy-list h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
}

.proxy-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.proxy-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.proxy-item-info {
  flex: 1;
}

.proxy-item-name {
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.proxy-item-details {
  font-size: 13px;
  color: #666;
}

.proxy-item-actions {
  display: flex;
  gap: 8px;
}

.proxy-item-action {
  background: none;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  font-size: 12px;
  transition: all 0.2s;
}

.proxy-item-action:hover {
  background: #e8eaed;
  color: #333;
}

.proxy-item-action.danger:hover {
  background: #fce8e6;
  color: #d93025;
}

/* Color Picker */
.color-picker {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #333;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #333;
}

/* Proxy Config */
.proxy-config {
  margin-top: 16px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
  max-height: 80%;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-content.large {
  max-width: 800px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.modal-close:hover {
  background: #f1f3f4;
  color: #333;
}

.modal-body {
  padding: 24px;
  max-height: 500px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e0e0e0;
  background: #f8f9fa;
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    margin: 0;
  }
  
  .header {
    padding: 16px 20px;
  }
  
  .header-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .nav-tabs {
    padding: 0 20px;
    overflow-x: auto;
  }
  
  .content {
    padding: 24px 20px;
  }
  
  .form-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .sessions-grid {
    grid-template-columns: 1fr;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-content.active {
  animation: fadeIn 0.3s ease-out;
}

/* Status indicators */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.status-indicator.online {
  background: #34a853;
}

.status-indicator.offline {
  background: #ea4335;
}

.status-indicator.warning {
  background: #fbbc04;
} 